# $Id$
# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Alexandre Bique <bique.alexandre@gmail.com>

pkgname=re2
_tag='2017-08-01'
pkgver=${_tag//-/}
pkgrel=1
pkgdesc='C++ library for fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python'
url='https://github.com/google/re2'
depends=(gcc-libs)
arch=(i686 x86_64)
license=(BSD)
source=(re2-$pkgver.zip::https://github.com/google/re2/archive/$_tag.zip)
sha1sums=('d92ac823aa8dea873b24479373f1b11884d0f7e6')

build() {
  cd re2-$_tag
  make prefix=/usr
}

check() {
  cd re2-$_tag
  make prefix=/usr test
}

package() {
  cd re2-$_tag
  make prefix=/usr DESTDIR="$pkgdir" install
  install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
